extends layouts/datatable

block title
  title= "ScanNet scans by tags"

block body
  div
    h1 Tags
    div.btn-group
      button.btn.btn-default.dropdown-toggle(type='button', data-toggle='dropdown')
        | Show
        span.caret
      ul.dropdown-menu(role='menu')
        li
          a(href='/scans/tags') All
        li
          a(href='/scans/tags?group=checked') Checked
        li
          a(href='/scans/tags?group=staging') Staging
  hr
  div#loadingMessage Loading...
  table#resultTable(style='visibility: hidden')
    thead
      tr
        th name
        th scans
        th actions
    tfoot
      tr
        th name
        th scans
        th actions
    tbody
      each tag in tags
        tr
          td #{tag.name}
          td #{tag.scans.length}
          td
            a.btn.btn-primary(href='/scans/manage?tags=#{tag.name}', role='button', title="View scans") Scans

block footer
  script(src="/js/tags.js")
  script(type="text/javascript").
    initResultTable({});
